import allRoutes from "./GenerateRoute" 
// console.log(allRoutes) 

let homeRoute=allRoutes.find(item=>item.path==='/home')

let paymentroute=homeRoute.children.find(item=>item.path==='payment')
let preorderRoute=homeRoute.children.find(item=>item.path==='preorder')
//目的 以前访问的/home能够访问到布局组件 现在希望访问 / 就能访问到布局组件
//  import allRoutes from "./GenerateRoute"====>
//  let target =allRoutes.find(item=>item.name==="home")//====>访问home中的子元素
 let dynamicRoute={
    path:"/",
    // children:[...target.children],//=====>同上
    children:[paymentroute,preorderRoute],
    component:()=>import(/*webpackChunkName:"layout"*/"@/layout/container.vue")
 }

 export default dynamicRoute